﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="profile.aspx.cs" Inherits="administration_profile" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <table>
                <tbody>
                    <tr>
                        <td>
                            <asp:Label ID="lblRole" runat="server" Text="Role:"></asp:Label>
                        </td>
                        <td colspan="3">
                            <asp:DropDownList ID="cbRole" runat="server" DataSourceID="ODSRole" DataTextField="NAME" DataValueField="ID" AutoPostBack="True" onselectedindexchanged="cbRole_SelectedIndexChanged">
                                <asp:ListItem Selected="True" Value="0">.........</asp:ListItem>
                            </asp:DropDownList>
                            <asp:ObjectDataSource ID="ODSRole" runat="server" SelectMethod="SeeAllTheRecords" TypeName="clsRole"></asp:ObjectDataSource>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblProfiles" runat="server" Text="Build Profile:"></asp:Label>
                        </td>
                        <td>
                            <fieldset class="fieldset" title="Search">
                                <legend>Programs</legend>
                                <asp:ListBox ID="listboxPrograms" runat="server" AutoPostBack="True" DataSourceID="ODSPrograms" DataTextField="NAME" DataValueField="ID"></asp:ListBox>
                                <asp:ObjectDataSource ID="ODSPrograms" runat="server" SelectMethod="SeeAllTheRecords" TypeName="clsProgram">
                                </asp:ObjectDataSource>
                            </fieldset>
                        </td>
                        <td>
                            <table>
                                <tbody>
                                    <tr>
                                        <td>
                                            <asp:Button ID="btnAdd" runat="server" Text="Add" onclick="btnAdd_Click" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Button ID="btnRemove" runat="server" Text="Remove" 
                                                onclick="btnRemove_Click" />
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </td>
                        <td>
                            <fieldset class="fieldset" title="Search">
                                <legend>Profile</legend>
                                <asp:ListBox ID="listboxProfiles" runat="server" AutoPostBack="True" 
                                    DataTextField="NAMEPROGRAM" DataValueField="ID" DataSourceID="ODSConsultProfileID"></asp:ListBox>
                            </fieldset>
                            <asp:ObjectDataSource ID="ODSConsultProfileID" runat="server" SelectMethod="ConsultProgramIDROLE" TypeName="clsProfile">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="cbRole" Name="idRole" 
                                        PropertyName="SelectedValue" Type="String" DefaultValue="1" />
                                </SelectParameters>
                            </asp:ObjectDataSource>
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <asp:Label ID="lblMessage" runat="server"></asp:Label>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </form>
</body>
</html>
